package com.atrix.CinemaView.pojo.dto;

import com.atrix.CinemaView.pojo.FileObj;
import lombok.Data;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

@Data
public class FileStreamData {
    protected InputStream inputStream;
    public FileStreamData(FileObj obj) {
        try {
            this.inputStream = new FileInputStream(obj.getData());
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}
